package com.mall.service.order.controller;

import com.mall.commons.common.CommonResult;
import com.mall.model.domain.OmsOrderSetting;
import com.mall.service.order.service.OmsOrderSettingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/orderSetting")
public class OmsOrderSettingController {
    @Autowired
    private OmsOrderSettingService os;

    @PostMapping("/update/{id}")
    public CommonResult update(@PathVariable Integer id, @RequestBody OmsOrderSetting omsOrderSetting) {
        os.update(id,omsOrderSetting);
        return CommonResult.success("修改成功");
    }


    @GetMapping("/{id}")
    public CommonResult select( @PathVariable Integer id){
     OmsOrderSetting omsOrderSetting=os.select(id);
     return CommonResult.success(omsOrderSetting);
    }
}
